import Vue from "vue";
import VueRouter from "vue-router";
import Layout from "@/components/Layout";

Vue.use(VueRouter);

const routes = [
  {
    path: "/login",
    name: "Login",
    component: () => import("@/views/login"),
  },
  {
    path: "/register",
    name: "Register",
    component: () => import("@/views/register"),
  },

  {
    path: "/",
    component: Layout,
    redirect: "/home",
    children: [
      {
        path: "home",
        component: () => import("@/views/home"),
        name: "Home",
      },
      {
        path: "/codeExamples",
        component: () => import("@/views/codeExamples"),
        name: "CodeExamples",
      },
      {
        path: "/developerKits",
        component: () => import("@/views/developerKits"),
        name: "DeveloperKits",
      },
      {
        path: "/website",
        component: () => import("@/views/website"),
        name: "Website",
      },
    ],
  },
];

const router = new VueRouter({
  routes,
});

export default router;
